package com.matrix.yukun.matrix.main_module.wallpaper.adapter;

import android.widget.ImageView;

import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.matrix.yukun.matrix.R;
import com.matrix.yukun.matrix.main_module.entity.CommentInfo;
import com.matrix.yukun.matrix.main_module.entity.WallpaperInfo;
import com.matrix.yukun.matrix.util.glide.GlideUtil;

import java.util.List;

public class RVCommentAdapter extends BaseQuickAdapter<CommentInfo, BaseViewHolder> {

    public RVCommentAdapter(int layoutResId, @Nullable List<CommentInfo> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, CommentInfo item) {
        helper.addOnClickListener(R.id.iv_avator);
        ImageView imageView=helper.getView(R.id.iv_avator);
        GlideUtil.loadCircleBoardImage(item.getUser().getAvatar(),imageView);
        helper.setText(R.id.tv_name,item.getUser().getName());
        helper.setText(R.id.tv_content,item.getContent());
    }

}
